<template>
  <div class="bo">
    <van-swipe v-if="bannerlist.length" class="my-swipe" :autoplay="1000" indicator-color="white">
      <van-swipe-item v-for="(item,index) in bannerlist" :key="index">
        <img :src="item.bannerUrl" alt="">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { banner_list } from "../../api/index";
export default {
  data() {
    return {
      bannerlist:[],
    };
  },
  mounted(){
    banner_list().then((res)=>{
      this.bannerlist=res.data.list
    })
  }
};
</script>

<style scoped>
.my-swipe {
  width: 95%;
  height: 100px;
  margin: 10px;
  background-color: blanchedalmond;

}
img {
  width: 100%;
  border-radius: 10px;
}
</style>